package com.kancy.spring.sample.aop;

import com.kancy.spring.aop.AopAspect;
import com.kancy.spring.aop.JoinPoint;
import com.kancy.spring.context.annotation.Aspect;
import com.kancy.spring.context.annotation.Component;
import com.kancy.spring.context.annotation.Order;
import com.kancy.spring.log.Log;

/**
 * LogAspect
 *
 * @author kancy
 * @date 2020/2/19 2:12
 */
@Order(5)
@Aspect
@Component
public class LogAspect implements AopAspect {

    @Override
    public String pointCut() {
        return "*";
    }

    @Override
    public void before() {
        Log.info("调用开始之前....");
    }

    @Override
    public void before(JoinPoint joinPoint) throws Throwable {

    }

    @Override
    public void after() {
        Log.info("调用方法之后....");
    }
}
